package com.czy.owner.entity;

import java.io.Serializable;

/**
 * Created by King on 2017-03-17
 */

public class PickCardEntity implements Serializable {
    public static final  int CARD_TYPE_TIMES = 0 ;
    public static final  int CARD_TYPE_CYCLE = 1 ;
    public static final  int CARD_TYPE_COUPON = 2 ;
    private int cardType;                   // 0次卡  1周期卡  2服务券

    private String cardName;
    private String description;
    private int leftCount;
    private String serviceName;
    private long createTime;
    private long startTime;
    private long endTime;
    private double price;
    private String cardNumber;
    private int userWalletId;
    private int storeServiceId;

    private boolean isPicked;

    public PickCardEntity() {
        super();
    }

    public PickCardEntity(PrePayBalancePaymentModel.TimeCardListBean timeCardListBean) {
        this.setCardType(CARD_TYPE_TIMES);
        this.setCardName(timeCardListBean.getCardName());
        this.setDescription(timeCardListBean.getDescription());
        this.setLeftCount(timeCardListBean.getTotalCount()-timeCardListBean.getUsedCount());
        this.setServiceName(timeCardListBean.getServiceName());
        this.setCreateTime(timeCardListBean.getCreateTime());
        this.setEndTime(timeCardListBean.getEndTime());
        //this.setPrice(timeCardListBean.getPrice());
        this.setCardNumber(timeCardListBean.getCardNumber());
        this.setPicked(timeCardListBean.isPicked());
        this.setUserWalletId(timeCardListBean.getUserWalletId());
        this.setStoreServiceId(timeCardListBean.getStoreServiceId());
    }
    public PickCardEntity(PrePayBalancePaymentModel.CycleCardListBean cycleCardListBean) {
        this.setCardType(CARD_TYPE_CYCLE);
        this.setCardName(cycleCardListBean.getCardName());
        this.setDescription(cycleCardListBean.getDescription());
        this.setLeftCount(cycleCardListBean.getTotalCount()-cycleCardListBean.getUsedCount());
        this.setServiceName(cycleCardListBean.getServiceName());
        this.setStartTime(cycleCardListBean.getStartTime());
        this.setCreateTime(cycleCardListBean.getCreateTime());
        this.setEndTime(cycleCardListBean.getEndTime());
        //this.setPrice(cycleCardListBean.getPrice());
        this.setCardNumber(cycleCardListBean.getCardNumber());
        this.setPicked(cycleCardListBean.isPicked());
        this.setUserWalletId(cycleCardListBean.getUserWalletId());
        this.setStoreServiceId(cycleCardListBean.getStoreServiceId());
    }
    public PickCardEntity(PrePayBalancePaymentModel.CouponsListBean couponsListBean) {
        this.setCardType(CARD_TYPE_COUPON);
        this.setDescription(couponsListBean.getDescription());
        this.setLeftCount(1);
        this.setServiceName(couponsListBean.getServiceName());
        this.setCreateTime(couponsListBean.getCreateTime());
        this.setEndTime(couponsListBean.getEndTime());
        this.setUserWalletId(couponsListBean.getUserWalletId());
        this.setPicked(couponsListBean.isPicked());
        this.setStoreServiceId(couponsListBean.getStoreServiceId());
    }

    public int getCardType() {
        return cardType;
    }

    public void setCardType(int cardType) {
        this.cardType = cardType;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getLeftCount() {
        return leftCount;
    }

    public void setLeftCount(int leftCount) {
        this.leftCount = leftCount;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public int getUserWalletId() {
        return userWalletId;
    }

    public void setUserWalletId(int userWalletId) {
        this.userWalletId = userWalletId;
    }

    public boolean isPicked() {
        return isPicked;
    }

    public void setPicked(boolean picked) {
        isPicked = picked;
    }

    public int getStoreServiceId() {
        return storeServiceId;
    }

    public void setStoreServiceId(int storeServiceId) {
        this.storeServiceId = storeServiceId;
    }


    @Override
    public String toString() {
        return "PickCardEntity{" +
                "cardType=" + cardType +
                ", cardName='" + cardName + '\'' +
                ", description='" + description + '\'' +
                ", leftCount=" + leftCount +
                ", serviceName='" + serviceName + '\'' +
                ", createTime=" + createTime +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", price=" + price +
                ", cardNumber='" + cardNumber + '\'' +
                ", userWalletId=" + userWalletId +
                ", storeServiceId=" + storeServiceId +
                ", isPicked=" + isPicked +
                '}';
    }
}
